import request from '@/utils/request'

export const getCommentsList = (roomNumber) => {
  return request.get('/comments/commentTree', {
    params: {
      roomNumber
    }
  })
}

export const createComments = (roomId, comment, parentId = 0) => {
  return request.post('/comments/create', {
    roomId,
    comment,
    parentId
  })
}

export const allComments = () => {
  return request.get('/comments/all')
}

export const deleteComment = (commentId) => {
  return request.delete(`/comments/delete/${commentId}`)
}
